import { RequestInstance } from "@/request"

// // * --------------------------------

const service = new RequestInstance()

export const http = {
  get: <T = any>(url: string, options?: Options) => {
    return service.request<T>({
      url,
      method: 'GET',
      ...options
    })
  },
  post: <T = any>(url: string, data?: object, options?: Options) => {
    return service.request<T>({
      url,
      method: 'POST',
      data,
      ...options
    })
  }
}

